import React, { Component } from 'react';
import Item from './Item';
import './index.less'
import banner1 from '../../../../static/images/banner1.png'
import banner2 from '../../../../static/images/banner2.png'
import banner3 from '../../../../static/images/banner3.png'
import banner4 from '../../../../static/images/banner4.png'
import banner5 from '../../../../static/images/banner5.png'
import banner6 from '../../../../static/images/banner6.png' 
class SearchView extends Component {
    state={
        banner:[banner1,banner2,banner3,banner4,banner5,banner6,banner1,banner2,banner3,banner4,banner5,banner6,banner1,banner2,banner3,banner4,banner5,banner6,banner1,banner2,banner3,banner4,banner5,banner6]
    }
    render() {
        return (
            <div className='list-container'>
                {
                    this.props.searchData.map((item,index)=>{
                        return <Item data={item} key={ Math.random().toString().slice(2)} img={this.state.banner[index]}/>
                    })
                }
            </div>  
        );
    }
}

export default SearchView;